package metalink.student;
import java.io.File;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import java.sql.*;

import vo.DocumentListVo;
import vo.Placementvo;
import model.student.*;
import myutil.*;

public class StudentPlacement extends ActionSupport{
	File attached_file;
	String file_name;
	int attachment_id;
	ArrayList<DocumentListVo> cvlist=new ArrayList<DocumentListVo>();
	ArrayList<Placementvo> companylist=new ArrayList<Placementvo>();
	
	public ArrayList<Placementvo> getCompanylist() {
		return companylist;
	}

	public void setCompanylist(ArrayList<Placementvo> companylist) {
		this.companylist = companylist;
	}

	public int getAttachment_id() {
		return attachment_id;
	}

	public void setAttachment_id(int attachment_id) {
		this.attachment_id = attachment_id;
	}

	public ArrayList<DocumentListVo> getCvlist() {
		return cvlist;
	}

	public void setCvlist(ArrayList<DocumentListVo> cvlist) {
		this.cvlist = cvlist;
	}

	public File getAttached_file() {
		return attached_file;
	}

	public void setAttached_file(File attached_file) {
		this.attached_file = attached_file;
	}

	public String getFile_name() {
		return file_name;
	}

	public void setFile_name(String file_name) {
		this.file_name = file_name;
	}

	public String execute(){
		UploadCv mo= new UploadCv();
		if(attachment_id==0){
		new UploadCv().uploadmycv(attached_file, file_name);
		cvlist=mo.getResumeList();
		companylist=mo.getCompanyList();
		}
		else{
			new UploadCv().deletecv(attachment_id);
			cvlist=mo.getResumeList();
			companylist=mo.getCompanyList();
		}
		return SUCCESS;
	}

}
